<%@ page language="java"
	import="java.util.*,java.lang.*,com.firesrc.bean.CountBean"
	contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>查看所有主题</title>
</head>
<body>
	<h3>查看所有主题</h3>
	<%
		List<CountBean> list = (List) request.getAttribute("list");
		Map<String, Integer> map = (Map) request.getAttribute("sendMap");
	%>
	共有主题记录<%=list.size()%>条
	<form action="" >
		<input type="hidden" name="type" value="add">
		<table border="1">
			<tbody align="left">
				<tr>
					<td>主题</td>
					<td>未发生邮箱数量</td>
					<td>已发送邮箱数量</td>
					<td>所含邮箱总数量</td>
					<td>操作</td>
				</tr>
				<%
					for (CountBean bean : list) {
						Integer count = map.get(bean.getName());
						if (count == null) {
							count = 0;
						}
				%>
				<tr>
					<%
						int unSendCount = bean.getCount() - count;
							if (unSendCount > 0) {
					%>
					<td><font color="red" size="4"><%=bean.getName()%></font></td>
					<td><font color="red" size="4"><%=unSendCount%></font></td>
					<%
						} else {
					%>
					<td><font color="blue"><%=bean.getName()%></font></td>
					<td><font color="blue"><%=unSendCount%></font></td>
					<%
						}
					%>
					<td><%=count%></td>
					<td><%=bean.getCount()%></td>
					<td><a  href="/QueryMailByTopic?topic=<%=bean.getName()%>">查看</a></td>
				</tr>
				<%
					}
				%>
			</tbody>
		</table>
	</form>
</body>
</html>